﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="BaoTinSai.ascx.vb" Inherits="FrontEnd_Control_Users_BaoTinSai" %>
<%@ Register Assembly="ValidationTextBox" Namespace="ValidationTextBox.CustomControls"
    TagPrefix="cc1" %>
<script type="text/javascript">
    $(function () {
     //   $('#<%= txtCode.ClientID  %>').realperson();
        $(".form_login input").keypress(function (e) {
            if (e.keyCode == 13) {
                $("#<%=btnSend.ClientID()%>").click();
                return false;
            }
        });

        $("#<%= btnSend.ClientID %>").click(function () {
            if (validateFormInputs() == true) {
                if (CheckCap() == true) {
                    return true;
                } else {

                    return false;
                }
            } else {

                return false;
            }
        });


    });
    function init() {
        Alertbox('Cập nhật dữ liệu thành công.');
        self.parent.tb_remove();
        parent.location.reload(true);

    }
    function CheckCap() {
        var elem = $('.hasRealPerson').val();
        var haselem = $('.realperson-hash').val();

        if (rpHash(elem) == haselem) {
            return true;
        }
        else {

            Alertbox('Vui lòng nhập đúng mã xác thực.');
            $('.hasRealPerson').select();
            $('.hasRealPerson').focus();
            return false;
        }
    }
    function rpHash(value) {
        var hash = 5381;
        for (var i = 0; i < value.length; i++) {
            hash = ((hash << 5) + hash) + value.charCodeAt(i);
        }
        return hash;
    }
</script>
<style type="text/css">
    .TitlePopup
    {
        font: bold 11px Arial, Tahoma, Verdana, Helvetica, sans-serif;
        color: #066bb9;
        text-transform: uppercase;
        text-align: left;
    }
</style>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div style="clear: both" />
        <div class="box_loginpopup" style="height:350px" >
            <!-- pages -->
            <div class="box_logincontent">
                <div class="form_login">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="30%" class="text_form_login" valign="middle" align="right">
                            </td>
                            <td width="70%" align="left" valign="middle" class="title_login">
                                BÁO TIN SAI
                            </td>
                        </tr>
                        <tr>
                            <td class="text_form_login" valign="top" align="right">
                                Nội dung:
                            </td>
                            <td valign="middle" style="padding-left: 10px" align="left" class="text_form_login_2">
                                 <cc1:ValidationTextBox ID="txtNoidung" DataType="required"  AssociatedLableText="nội dung" CssClass="TextBox" MaxLength="500" runat="server"
                                    TextMode="MultiLine" Height="100px" Width="300px" />
                            </td>
                        </tr>
                        <tr>
                            <td class="text_form_login" valign="middle" align="right">
                                Mã bảo vệ:
                            </td>
                            <td valign="middle" align="left" style="padding-left: 10px" class="text_form_login_2">
                                <cc1:ValidationTextBox ID="txtCode" runat="server" DataType="required"   AssociatedLableText="mã xác thực" CssClass="TextBox"  />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                            <td class="text_form_login_2">
                                <asp:Button ID="btnSend" CssClass="btn_login" runat="server" Text="Báo tin sai" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                            <td class="text_note_login">
                            </td>
                        </tr>
                    </table>
                    <div style="height: 10px" class="clear_both">
                    </div>
                </div>
            </div>
            <!-- end pages -->
            <asp:HiddenField ID="hidRaoVatId" Value="0" runat="server" />
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
